/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package nominalitzacions.domain;

import commonlib.domain.Corpus;
import nominalitzacions.stubs.Dictionary;
import nominalitzacions.stubs.Rules;


/**
 *This class represents a language and contains the sources to load it.
 * @author marc.mauri
 */
public class Language {

    /**
     * This is the the language name.
     */
    protected String languageName;

    /**
     * This is the path where the dictionary is stored.
     */
    protected String dicoInfPath;

    protected String dicoIrregPath;

    protected String dicoNamePath;

    protected LanguageState state;

    /**
     * This is the path where the pair corpus is stored.
     */
    protected String corpusPath;

    public Language() {
        languageName = null;
        dicoInfPath = null;
        dicoIrregPath = null;
        dicoNamePath = null;
        corpusPath = null;
        state = new InactiveLanguage();
    }

    public Language(String languageName, String dicoInfPath, String dicoIrregPath,
                String dicoNamePath, String corpusPath) {
        this.languageName = languageName;
        this.dicoInfPath = dicoInfPath;
        this.dicoIrregPath = dicoIrregPath;
        this.dicoNamePath = dicoNamePath;
        this.corpusPath = corpusPath;
        state = new InactiveLanguage();
    }

    /**
     *
     * @param languageName The language name.
     */
    public void setLanguageName(String languageName) {
        this.languageName = languageName;
    }

    /**
     *
     * @return The language name.
     */
    public String getLanguageName() {
        return languageName;
    }
    
    /**
     *
     * @param dicoInfPath The path where the language dictionary is stored.
     */
    public void setDicoInfPath(String dicoInfPath) {
        this.dicoInfPath = dicoInfPath;
    }

    /**
     *
     * @return The path where the language dictionary is stored.
     */
    public String getDicoInfPath() {
        return dicoInfPath;
    }

    /**
     *
     * @param dicoInfPath The path where the language dictionary is stored.
     */
    public void setDicoIrregPath(String dicoIrregPath) {
        this.dicoIrregPath = dicoIrregPath;
    }

    /**
     *
     * @return The path where the language dictionary is stored.
     */
    public String getDicoIrregPath() {
        return dicoIrregPath;
    }

    /**
     *
     * @param dicoInfPath The path where the language dictionary is stored.
     */
    public void setDicoNamePath(String dicoNamePath) {
        this.dicoNamePath = dicoNamePath;
    }

    /**
     *
     * @return The path where the language dictionary is stored.
     */
    public String getDicoNamePath() {
        return dicoNamePath;
    }

    /**
     *
     * @param corpusPath The path where the language corpus is stored.
     */
    public void setCorpusPath(String corpusPath) {
        this.corpusPath = corpusPath;
    }

    /**
     *
     * @return The path where the language pair corpus is stored.
     */
    public String getCorpusPath() {
        return corpusPath;
    }

    public void setState(LanguageState state) {
        this.state = state;
    }

    public Dictionary getInfDico() {
        return this.state.getInfDico();
    }

    public void setInfDico(Dictionary infDico) {
        this.state.setInfDico(infDico);
    }

    public Dictionary getIrregDico() {
        return this.state.getIrregDico();
    }

    public void setIrregDico(Dictionary irregDico) {
        this.state.setInfDico(irregDico);
    }

    public Dictionary getNameDico() {
        return this.state.getNameDico();
    }

    public void setNameDico(Dictionary nameDico) {
        this.state.setNameDico(nameDico);
    }

    public Corpus getCorpus() {
        return this.state.getCorpus();
    }

    public void setCorpus(Corpus corpus) {
        this.state.setCorpus(corpus);
    }

    public void setRules(Rules rules) {
        this.state.setRules(rules);
    }

    public Rules getRules() {
        return this.state.getRules();
    }

}